package com.dubito.synchro;

/**
 * @author liliang
 * @description:
 * @date 2018/12/20.
 */
public class DisappearRequestOne implements Runnable {

    static DisappearRequestOne instance = new DisappearRequestOne();

    static int i = 0;

    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(instance);
        Thread t2 = new Thread(instance);
        t1.start();
        t2.start();
        t1.join();
        t2.join();
        System.out.println(i);
    }

    @Override
    public void run() {
        for (int j = 0; j < 100000; j++) {
            i++;
        }
    }
}
